package mdt.ext;

import org.tigris.gef.base.*;
import org.tigris.gef.ui.ToolBar;

/**
 * Created by xiaobyu on 7/19/2016.
 */
public class PaletteFigExt extends ToolBar {

    /**
     *
     */
    private static final long serialVersionUID = 304194274216578087L;

    public PaletteFigExt() {
        defineButtons();
    }

    /**
     * Defined the buttons in this palette. Each of these buttons is associated
     * with an CmdSetMode, and that Cmd sets the next global Mode to somethign
     * appropriate. All the buttons can stick except 'select'. If the user
     * unclicks the sticky checkbox, the 'select' button is automatically
     * pressed.
     */
    public void defineButtons() {
        add(new CmdSetMode(ModeSelect.class, "Select"));
        add(new CmdSetMode(ModeBroom.class, "Broom"));
        addSeparator();
        add(new CmdSetMode(ModeCreateFigCircleExt.class, "Circle"));
        add(new CmdSetMode(ModeCreateFigRectExt.class, "Rectangle"));
        add(new CmdSetMode(ModeCreateFigRRectExt.class, "RRect"));
        add(new CmdSetMode(ModeCreateFigLineExt.class, "Line"));

        add(new CmdSetMode(ModeCreateFigTextExt.class, "Text"));
        add(new CmdSetMode(ModeCreateFigPolyExt.class, "Polygon"));
        add(new CmdSetMode(ModeCreateFigSplineExt.class, "Spline"));
        add(new CmdSetMode(ModeCreateFigInkExt.class, "Ink"));
    }
}